package model.load
{
	import flash.net.URLLoaderDataFormat;
	import flash.net.URLRequestMethod;
	
	public class ImgUploadMessage extends AbsLoadMessage
	{
		private var backFunction:Function;
		
		public function ImgUploadMessage(backFunction:Function)
		{
			method = URLRequestMethod.POST;
			this.backFunction = backFunction;
			_dataFormat = URLLoaderDataFormat.TEXT;
			this.timeout = 100;
			this.contentType = "application/octet-stream";
		}
		
		override public function back(...args) : void
		{
			backFunction(args[0]);	
		}
		
		override public function set percent(v:Number) : void
		{
			trace("upload:",v);
		}
	}
}